home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / info-service / wais / ir-book-sources / stopper / strlist.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-08  |  2.1 KB  |  55 lines

  1.  
  2. /*******************************   strlist.h   *********************************
  3.  
  4.     Purpose: Simple string list abstract data type module header
  5.  
  6.     Notes:   This module implements a straightforward string ordered list 
  7.              abstract data type.  It is optimized for appending and deleting 
  8.              from the end of the list.  Since they are ordered lists, string
  9.              lists may be sorted, and their members are addressed by ordinal
  10.              position (starting from 0).
  11. **/
  12.  
  13. #ifndef STRLIST_H
  14. #define STRLIST_H
  15.  
  16. /******************************************************************************/
  17. /****************************   Public Constants   ****************************/
  18.  
  19. #define NULL_INDEX                     -1        /* invalid string index */
  20.  
  21. /******************************************************************************/
  22. /******************************   Public Types   ******************************/
  23.  
  24. typedef struct _StrListStruct *StrList;          /* the base string list type */
  25.  
  26. /******************************************************************************/
  27. /****************************   Public Routines   *****************************/
  28.  
  29. #ifdef __STDC__
  30.  
  31. extern void    StrListAppend( StrList list, string */ );
  32. extern void    StrListAppendFile( StrList list, char *filename );
  33. extern StrList StrListCreate( void );
  34. extern void    StrListDestroy( StrList list );
  35. extern int     StrListEqual( StrList list1, StrList list2 );
  36. extern char *  StrListPeek( StrList list, int index );
  37. extern int     StrListSize( StrList list );
  38. extern void    StrListSort( StrList list );
  39. extern void    StrListUnique( StrList list );
  40.  
  41. #else
  42.  
  43. extern void    StrListAppend( /* list, string */ );
  44. extern void    StrListAppendFile( /* list, filename */ );
  45. extern StrList StrListCreate( /* void */ );
  46. extern void    StrListDestroy( /* list */ );
  47. extern int     StrListEqual( /* list1, list2 */ );
  48. extern char *  StrListPeek( /* list, index */ );
  49. extern int     StrListSize( /* list */ );
  50. extern void    StrListSort( /* list */ );
  51. extern void    StrListUnique( /* list */ );
  52.  
  53. #endif
  54. #endif
  55.